cluster: correctly handle relative unix socket paths#16749
cluster: correctly handle relative unix socket paths#16749laino wants to merge 1 commit intonodejs:masterfrom
Conversation
|
I feel like this should be done more upstream (in node core) to avoid having to potentially call |
lib/internal/cluster/child.js
Outdated
There was a problem hiding this comment.
AFAIK we are still using util._extend() instead Object.assign() for performance reasons.
There was a problem hiding this comment.
New tests don't need the copyright comment.
There was a problem hiding this comment.
Can you add a common.mustCall() to the callback.
There was a problem hiding this comment.
Instead of forcing the exit, can you cleanup as necessary and let the process exit naturally.
|
Do you like your PR commits --amend'ed or with a second commit? |
|
@laino Whatever is easier for you :) We’re going to squash commits when landing them anyway |
4f3e58f to
9ce5f77
Compare
|
Hey, is there anything else that needs changing for this to be merged? |
|
@laino Related failures on all Windows builds: |
|
@joyeecheung That's the test I added with this PR. It should probably be disabled on windows, but I'm not sure. I don't know much about named pipes on windows. |
|
I'll check tomorrow whether there's any tests for named pipes at all for windows, since I'm worried now this might break something. Also I should probably change https://github.com/nodejs/node/pull/16749/files#diff-a8eff7604cf3ad3580c1949c54176127R282 to only happen on Linux, since it doesn't make much sense on systems that don't have the arbitrary 100 byte limitation. |
|
Hello @laino, Welcome, and thank you for the contribution! 🥇 Named pipes on Windows live in their own FS namespace, and must be prefixed with if (common.isWindows)
common.skip('no 100 byte limit on pipe names on Windows'); |
|
ping @laino ... If you have the opportunity, could you try to fix this on Windows, or if not, could you let us know? |
|
Ping @laino |
Relative unix sockets paths were previously interpreted relative to the master's CWD, which was inconsistent with non-cluster behavior. A test case has been added as well. Fixes: nodejs#16387
9ce5f77 to
e9d6c4b
Compare
|
Sorry, I had all but forgotten about this PR. I made sure the test won't run on windows and that the code to deal with unix domain sockets |
|
https://ci.nodejs.org/job/node-test-commit-arm/13003/nodes=ubuntu1604-arm64_odroid_c2/console This is the build that failed. Doesn't seem to be related to this? |
|
@laino That's a known OOM issue, the CI looks green to me. |
|
|
||
| // Ref: | ||
| // https://github.com/nodejs/node/issues/16387 | ||
| // https://github.com/nodejs/node/pull/16749 |
There was a problem hiding this comment.
These refs can be removed during landing. They should be in the metadata, not in the comments.
|
CI before landing https://ci.nodejs.org/job/node-test-pull-request/12568/ |
|
Landed in 4e2e7d1, thanks! |
Relative unix sockets paths were previously interpreted relative to the master's CWD, which was inconsistent with non-cluster behavior. A test case has been added as well. PR-URL: #16749 Fixes: #16387 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
|
Back-porters: should be back-ported along with #18263. |
Relative unix sockets paths were previously interpreted relative to the master's CWD, which was inconsistent with non-cluster behavior. A test case has been added as well. PR-URL: #16749 Fixes: #16387 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
|
Should this be backported to |
Relative unix sockets paths were previously interpreted relative to the master's CWD, which was inconsistent with non-cluster behavior. A test case has been added as well. PR-URL: #16749 Fixes: #16387 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Relative unix sockets paths were previously interpreted relative to the master's CWD, which was inconsistent with non-cluster behavior. A test case has been added as well.
I only added the "find the shortest possible path for unix sockets" to the cluster code, so that
outside of workers the net API would still map to the actual syscalls happening under the hood
cleanly.
Fixes: #16387
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
net, cluster